package org.gap.wizards.views;

import net.slashie.libjcsi.CSIColor;
import net.slashie.libjcsi.ConsoleSystemInterface;
import net.slashie.libjcsi.textcomponents.BarGraph;

import org.gap.wizards.creature.Creature.Attribute;
import org.gap.wizards.pc.PlayerCharacter;

public class QuickView  implements View {
	private BarGraph hitPoints;
	private final PlayerCharacter player;

	public QuickView(ConsoleSystemInterface csi, PlayerCharacter player) {
 		this.player = player;

		hitPoints = new BarGraph(csi);
		hitPoints.setBounds(0, 6, 2, 7);
		hitPoints.setForeColor(CSIColor.RED);
		hitPoints.setBorder(true);
	}

	@Override
	public void draw() {
		hitPoints.setMaximum(player.getMaxAttribute(Attribute.Hitpoints));
		hitPoints.setValue(player.getAttribute(Attribute.Hitpoints));
		hitPoints.draw();
	}
}
